home *** CD-ROM | disk | FTP | other *** search
- {=================================================
- Program: SysFile.Exe
- Version: 1.0
- Module: SysGlb.pas
- Author: Wayne Niddery
- CopyRight ⌐ 1995 Wayne Niddery and WinWright
- =================================================}
- unit SysGlb;
-
- {SysGlb contains all the constants and lobal variables needed by
- the other units.}
-
- interface
-
- uses
- IniFiles;
-
- const
- {Help File constants (generated using ForeHelp)}
- Adding_to_Auto_Open = 4;
- Auto_list_Box = 9;
- Contents = 0;
- Drop_Button = 12;
- File_List_Box = 8;
- Help_Button = 13;
- Options_Button = 11;
- Overview = 1;
- Selecting_a_file_to_Edit = 5;
- sh_Tabs = 7;
- Take_Button = 10;
- the_first_time = 3;
- The_Setup_Page = 6;
- Using_SysFile = 2;
- Removing_from_Auto_Open = 14;
- Deleting_files = 15;
- Adding_files_to_Protect = 16;
- Drag_and_Drop_option = 19;
- File_Page = 17;
- Saving_Files = 18;
- Options_Dialog = 20;
- No_Prompt_Option = 21;
- Protection_Dialog = 22;
- Popup_menus = 23;
- Find_and_Replace = 24;
- Exit_from_SysFile = 25;
- Prompt_Each_File_Option = 27;
- Prompt_Once_Only_Option = 28;
- Confirm_Deletes_Option = 30;
- Just_Do_It_Delete_Option = 31;
- Options_Dialog_OK_Button = 32;
- Options_Dialog_About_Button = 35;
- Deletes_not_Allowed_Option = 29;
- Registration = 26;
- Options_Dialog_Cancel_Button = 33;
- Editing_a_File = 34;
-
- const
- {Application defined message used to inform Form1 that the
- delete option has changed}
- DelOptChanged = 100;
-
- {These message constants are used when giving user option to
- reboot system or restart Windows}
- RestartMsg = 'One or more initialization files have changed. ' +
- 'Would you like to restart Windows at this time?';
- ReBootMsg = 'System may need to be rebooted in order for changes ' +
- 'to files to take effect. Do you want to reboot now?';
-
- const
- {these are the default file names for protection}
- AUTOEXEC = 'AUTOEXEC.BAT';
- CONFIG = 'CONFIG.SYS';
- WININI = 'WIN.INI';
- SYSTEMINI = 'SYSTEM.INI';
- PROTOCOLINI = 'PROTOCOL.INI';
- CONTROLINI = 'CONTROL.INI';
- PROGMANINI = 'PROGMAN.INI';
- SERIALNOINI = 'SERIALNO.INI';
- WINFILEINI = 'WINFILE.INI';
- SYSFILEINI = 'SYSFILE.INI';
-
- {Default list of protected and auto-opened files.
- SysFileIni MUST be last so we can deliberately leave it out
- of the auto-open default startup}
- DefProt: array [0..9] of string[12] = (
- AutoExec, Config, WinIni, SystemIni, ProtocolIni,
- ControlIni, ProgManIni, SerialNoIni, WinFileIni, SysFileIni);
-
- {these are the section names in our INI file}
- iniProtect = 'Protect';
- iniOptions = 'Options';
- iniAutoOpen = 'AutoOpen';
- iniPosition = 'Position';
-
- {These constants are used to store forms position and size
- to SysFile's initialization file - SYSFILE.INI}
- iniLeft = 'Left';
- iniTop = 'Top';
- iniWidth = 'Width';
- iniRight = 'Right';
- iniHeight = 'Height';
- iniPage = 'Page';
- {Save option values correspond to position in SaveGroup}
- opNoPrompt = 0;
- opPromptEach = 1;
- opPromptOnce = 2;
- {Delete option values correspond to position in DeleteGroup}
- opNoDelete = 0;
- opConfirm = 1;
- opDoIt = 2;
-
- {global string constants}
- Slash: string = '\';
- Root: string = 'C:\';
- IniFilter = '*.INI';
-
- var
- {Windows Directory is stored here on program startup}
- WinDir: string[144];
- {handles our own INI file}
- SysIni: TIniFile;
-
- implementation
-
- end.
-